import sys
sys.path.append("..")

from classiferstatic import analyDetailResultFile

import unittest

class testAnaDetailFile(unittest.TestCase):
    def testfile(self):
        rdic = analyDetailResultFile("teststaticdetail.txt")
        
        self.assertEqual(rdic['detail'][0]['p'],0)
        self.assertEqual(rdic['detail'][0]['r'],0)
        self.assertEqual(rdic['detail'][0]['f'],0)

        self.assertEqual(rdic['detail'][1]['f'],0.8)

        self.assertEqual(rdic['detail'][3]['r'],8.0/9)
        
          
if __name__ == "__main__":
    unittest.main()
